package com.onpositive.datacollection.editor;

import org.eclipse.swt.widgets.Composite;

import com.onpositive.semantic.model.api.changes.IValueListener;
import com.onpositive.semantic.ui.workbench.elements.XMLView;

public abstract class CollectionView extends XMLView{

	IValueListener<Object>llm=new IValueListener<Object>() {

		/**
		 * 
		 */
		private static final long serialVersionUID = 1L;

		@Override
		public void valueChanged(Object oldValue, Object newValue) {
			doRefresh();
		}
	};
	
	public void dispose() {
		DataCollectionAcess.removeListener(llm);
		super.dispose();
	};
	public CollectionView(String string) {
		super(string);
		DataCollectionAcess.addListener(llm);
	}

	@Override
	public void createPartControl(Composite parent) {
		
		super.createPartControl(parent);
	}
	protected abstract void doRefresh();
}
